function [elements,processInfo] = InitializeSolutionStep...
    (elements,model,processInfo)
ne = model.countElements();
for i=1:ne
    e = model.getElement(i-1);
    f = e.getFace();
    ue = f.getUHatLocal();
    ng = e.getNumGaussPoint();
    B = zeros(3,8);
    C = elements(i).constitutiveMatrix;
    if elements(i).isCrack == 0
        for j = 1:ng
            xi = e.getGaussPoint(j-1);
            B = e.computeB(f,B,xi);
            epsilon = B*ue;
            elements(i).stress(:,j) = C*epsilon;
        end
    else
        for j = 1:ng
            xi = e.getGaussPoint(j-1);
            B = e.computeB(f,B,xi);
            Gc = computeGc(elements(i),B);
            epsilon = B*ue + Gc*elements(i).Xi;
            elements(i).stress(:,j) = C*epsilon;
        end
    end
    
end

